<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport"
          content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/>
    <title>个人理财系统</title>
    <!-- 引入bootstrap样式 -->
    <link th:href="@{/bootstrap/css/bootstrap.css}" rel="stylesheet" type="text/css">
    <!--图标库-->
    <link th:href="@{/lyear/css/materialdesignicons.min.css}" rel="stylesheet" type="text/css"/>
    <!--自定义样式-->
    <link href="../lyear/css/style.min.css" th:href="@{/lyear/css/style.min.css}" rel="stylesheet" type="text/css"/>

</head>
<body>
<div class="lyear-layout-web">
    <div class="lyear-layout-container">
        <!--左侧导航-->
        <div th:replace="user/common/leftbar::#leftbaraside"></div>
        <!--头部信息-->
        <div th:replace="user/common/topbar::#topbarheader"></div>

        <!--页面主要内容-->
        <main class="lyear-layout-content">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-lg-12">
                        <div class="card">
                            <div class="card-header">
                                <h4>新闻资讯</h4>
                            </div>
                        </div>
                    </div>

                    <div th:if="${!newsList.isEmpty()}" th:each="news:${newsList}">
                        <div class="col-sm-12">
                            <div class="card">
                                <div class="card-header bg-primary">
                                    <h4 th:text="${news.title}"></h4>
                                    <ul class="card-actions">
                                        <li>
                                            <p th:text="${#dates.format(news.createtime, 'yyyy-MM-dd')}"></p>
                                        </li>
                                    </ul>
                                </div>
                                <div class="card-body">
                                    <p th:text="${news.newsdesc}">
                                    </p>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div th:if="${newsList.isEmpty()}" class="card-body">
                        <div class="table-responsive">
                            <h4>很抱歉！暂时还没有新闻向您推荐</h4>
                        </div>
                    </div>

                </div>
            </div>
        </main>
        <!--End 页面主要内容-->
    </div>
</div>

<!-- 引入jQuery和bootstrap的js -->
<script th:src="@{/js/jquery.js}"></script>
<script th:src="@{/bootstrap/js/bootstrap.js}"></script>
<!--滚动条插件-->
<script th:src="@{/lyear/js/perfect-scrollbar.min.js}"></script>
<!--自定义js脚本-->
<script th:src="@{/lyear/js/main.min.js}"></script>
<script type="text/javascript">

</script>
</body>
</html>
